<?php
/* Widget Content */

$Record = new Pod('deal');
$Record->page = 1;
$Record->search = false;
$where = "t.camp_end >= ".fix_date()." && t.dealcheck='1' && brand.id != '203' && t.camp_start <= ".fix_date();

$Record->findRecords('camp_end ASC', 5, $where);
if($Record->getTotalRows() > 0){
	echo '<div style="font-size: 0.8em;">';
	echo '<h2>Offers Expiring Soon</h2>';
	$j=1;
	while($Record->fetchRecord()){
	    echo '<div class="listlink" style="width: 250px;"><a href="'.BUZZR_URL.'/deals/'.$Record->get_field('camp_link').'">'.$j.'. '.substr($Record->get_field('name'), 0, 50).'</a></div>';
		$j++;
	}
	echo '<a href="'.BUZZR_URL.'/deals-expiringsoon">...More Offers!</a>';
	echo '</div>';
}

/* Widget Content */
?>

<?php
/* Widget Logic */
is_pod_page()
/* Widget Logic */
?>
